<template>
  <div>
    <el-button type="primary" @click="logout">退出</el-button>
    <el-button type="success" @click="getRoutes">查看路由</el-button>
    <el-button type="warning" @click="refreshPath">刷新页面</el-button>
  </div>
</template>
<script>
export default {
  name: 'HelpButton',
  methods: {
    logout() {
      this.$store.dispatch('user/logout').then(() => {
        this.$router.push('/login')
      })
    },
    getRoutes() {
      console.log(this.$router.getRoutes())
    },
    refreshPath() {
      window.location.reload()
    }
  }
}
</script>
